package com.fansaikj.erp.domain.goods;

/*
 * Copyright © 2020-2035 erupt.xyz All rights reserved.
 * Author: YuePeng (erupts@126.com)
 */

import javax.persistence.*;

import lombok.Data;
import lombok.EqualsAndHashCode;
import xyz.erupt.annotation.*;
import xyz.erupt.annotation.sub_erupt.Power;
import xyz.erupt.annotation.sub_field.*;
import xyz.erupt.annotation.sub_field.sub_edit.*;
import xyz.erupt.jpa.model.BaseModel;

import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Erupt(name = "物料分类", power = @Power(importable = true, export = true))
@Table(name = "erp_goods_class")
@Entity
@Data
public class GoodsClass extends BaseModel {

    @EruptField(
            views = @View(
                    title = "", show = false
            ),
            edit = @Edit(
                    title = "",
                    type = EditType.INPUT, show = false, notNull = true,
                    inputType = @InputType
            )
    )
    private Long id;

    @EruptField(
            views = @View(
                    title = "分类名称"
            ),
            edit = @Edit(
                    title = "分类名称",
                    search = @Search(
                            vague = true
                    ),
                    type = EditType.INPUT, notNull = true,
                    inputType = @InputType
            )
    )
    private String className;

    @EruptField(
            views = @View(
                    title = "分类编号"
            ),
            edit = @Edit(
                    title = "分类编号",
                    type = EditType.INPUT, notNull = true,
                    inputType = @InputType
            )
    )
    private String classCode;

    @EruptField(
            views = @View(
                    title = "是否启用"
            ),
            edit = @Edit(
                    title = "是否启用",
                    type = EditType.INPUT,
                    inputType = @InputType
            )
    )
    private String isValid;

    @EruptField(
            views = @View(
                    title = "创建人", show = false
            ),
            edit = @Edit(
                    title = "创建人",
                    type = EditType.INPUT, show = false,
                    inputType = @InputType
            )
    )
    private String createBy;

    @EruptField(
            views = @View(
                    title = "创建日期", show = false
            ),
            edit = @Edit(
                    title = "创建日期",
                    type = EditType.DATE, show = false,
                    dateType = @DateType
            )
    )
    private Date createTime;

    @EruptField(
            views = @View(
                    title = "更新人", show = false
            ),
            edit = @Edit(
                    title = "更新人",
                    type = EditType.INPUT, show = false,
                    inputType = @InputType
            )
    )
    private String updateBy;

    @EruptField(
            views = @View(
                    title = "更新日期", show = false
            ),
            edit = @Edit(
                    title = "更新日期",
                    type = EditType.DATE, show = false,
                    dateType = @DateType
            )
    )
    private Date updateTime;

    @EruptField(
            views = @View(
                    title = "所属部门"
            ),
            edit = @Edit(
                    title = "所属部门",
                    type = EditType.INPUT,
                    inputType = @InputType
            )
    )
    private String sysOrgCode;

    @EruptField(
            views = @View(
                    title = "删除状态(0-正常,1-已删除)", show = false
            ),
            edit = @Edit(
                    title = "删除状态(0-正常,1-已删除)",
                    type = EditType.INPUT, show = false,
                    inputType = @InputType
            )
    )
    private String delFlag;

}
